<?
class Application_Model_CampaignHistory extends Application_Model_DomainObject{
    
    protected $_id;
    
    protected $_userId;
    
    protected $_campaignId;
    
    protected $_dateCreated;
    
    protected $_description;
    
    /**
     * 端午节抽奖活动
     */
    const DWAWARD = 1;
    
    /**
     * 端午节代金券
     */
    const DWCOUPON = 2;

        /**
     * 返回用户参加活动的历史记录
     * @param type $campaignId 活动ID
     * @param type $userId 用户ID
     */
    public static function getByCampaignAndUserId($campaignId,$userId){
        return self::getDao()->queryAll(array('campaignId'=>$campaignId,'userId'=>$userId));
    }
    
}